import Base from '../../base.js';
import columnModel from '../../../model/column'
export default class extends Base {
  /**
   * 获取栏目列表
   */
  async indexAction() {
    const columnDb = think.model('column') as columnModel;
    try{
      const data = await columnDb.getList()
      return this.json(this.dataJsonSuccess(data))
    }catch (error) {
      return this.json(this.dataJsonError(500, null))
    }
  }
  
}
